private ["_handler","_function","_idx","_array","_handlers_list","_functions_list"];
_handler = toupper(_this select 0);
_function = _this select 1;

_handlers_list = TYR_FUNCTIONS_HANDLER_LIST select 0;
_functions_list = TYR_FUNCTIONS_HANDLER_LIST select 1;

_idx = _handlers_list find _handler;
if (_idx < 0) then {
	_idx = count _handlers_list;
};
_handlers_list set [_idx, _handler];
_array = [];
if (_idx < count _functions_list) then {
	_array = _functions_list select _idx;
};
_array set [count _array, _function];
_functions_list set [_idx,_array];
TYR_FUNCTIONS_HANDLER_LIST = [_handlers_list,_functions_list];
//diag_log ["tyr_fnc_addHandler",count TYR_FUNCTIONS_HANDLER_LIST,_this];
count _array;